package com.xvexi;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
//
//        Fruit f = new Apple();
//        System.out.println("请输入苹果的种类");
//        f.setName(sc.next());
//        System.out.println("请输入苹果的产地");
//        f.setArea(sc.next());
//        System.out.println("请输入苹果的价格");
//
//        f.setPrice(sc.nextDouble());
//        String string = f.toString();
//        System.out.println(string) ;
//        System.out.println("_______________________________________________________________");
//
//        Fruit f1 = new Xigua();
//        System.out.println("请输入苹果的种类");
//        f1.setName(sc.next());
//        System.out.println("请输入苹果的产地");
//        f1.setArea(sc.next());
//        System.out.println("请输入苹果的价格");
//
//        f1.setPrice(sc.nextDouble());
//        String string1 = f1.toString();
//        System.out.println(string1);
//        System.out.println("_______________________________________________________________");
//
//        Fruit f2 = new Banana();
//        System.out.println("请输入苹果的种类");
//        f2.setName(sc.next());
//        System.out.println("请输入苹果的产地");
//        f2.setArea(sc.next());
//        System.out.println("请输入苹果的价格");
//
//        f2.setPrice(sc.nextDouble());
//        String string2 = f2.toString();
//        System.out.println(string2);
        Fruit fruit = new Fruit();
        fruit.setName("香蕉");
        fruit.setArea("红河");
        fruit.setPrice(20);

        System.out.println(fruit.getName());
        System.out.println(fruit.getArea());
        System.out.println(fruit.getPrice());
    }
}
